package com.wgc.vip.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName evaluation
 */
@TableName(value ="evaluation")
@Data
public class Evaluation implements Serializable {
    /**
     * 评论ID
     */
    @TableId
    private Long id;

    /**
     * 商品名字
     */
    private String productName;

    /**
     * 会员名称
     */
    private String vipName;

    /**
     * 评价
     */
    private String evaluate;

    /**
     * 物流评分
     */
    private Integer logisticsRating;

    /**
     * 服务评分
     */
    private Integer serviceRating;

    /**
     * 描述评分
     */
    private Integer describeRating;

    /**
     * 评价时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 状态（0展示，1不展示）
     */
    private Integer status;

    /**
     * 删除（0未删除，1删除）
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Evaluation other = (Evaluation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getVipName() == null ? other.getVipName() == null : this.getVipName().equals(other.getVipName()))
            && (this.getEvaluate() == null ? other.getEvaluate() == null : this.getEvaluate().equals(other.getEvaluate()))
            && (this.getLogisticsRating() == null ? other.getLogisticsRating() == null : this.getLogisticsRating().equals(other.getLogisticsRating()))
            && (this.getServiceRating() == null ? other.getServiceRating() == null : this.getServiceRating().equals(other.getServiceRating()))
            && (this.getDescribeRating() == null ? other.getDescribeRating() == null : this.getDescribeRating().equals(other.getDescribeRating()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getVipName() == null) ? 0 : getVipName().hashCode());
        result = prime * result + ((getEvaluate() == null) ? 0 : getEvaluate().hashCode());
        result = prime * result + ((getLogisticsRating() == null) ? 0 : getLogisticsRating().hashCode());
        result = prime * result + ((getServiceRating() == null) ? 0 : getServiceRating().hashCode());
        result = prime * result + ((getDescribeRating() == null) ? 0 : getDescribeRating().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productName=").append(productName);
        sb.append(", vipName=").append(vipName);
        sb.append(", evaluate=").append(evaluate);
        sb.append(", logisticsRating=").append(logisticsRating);
        sb.append(", serviceRating=").append(serviceRating);
        sb.append(", describeRating=").append(describeRating);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}